package com.zndroid.gridview.inner.drag;


import android.content.Context;

public interface ICarrier {
    /**
     * current Context
     * @return Context
     * */
    Context getContext();

    /**
     * from A to B
     * @param curX Xa
     * @param curY Ya
     * @param lastX Xb
     * @param lastY Yb
     * */
    void onMove(int lastX, int lastY, int curX, int curY);

    /**
     * done
     * */
    void onDone();

    /**
     * post run on main thread
     * @return true or false
     * */
    boolean post(Runnable runnable);

    /**
     * remove running action
     * @param action runnable
     * @return true or false
     * */
    boolean removeCallbacks(Runnable action);
}
